package com.loong.coupon.model;

import com.loong.common.mybatis.entity.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class Coupon extends BaseEntity {
    /**
     * 优惠券名称
     */
    @Column(name = "coupon_name")
    private String couponName;

    /**
     * 面额
     */
    @Column(name = "coupon_money")
    private BigDecimal couponMoney;

    /**
     * 优惠券颜色
     */
    private Integer color;

    /**
     * 满减条件
     */
    @Column(name = "discount_condition")
    private BigDecimal discountCondition;

    /**
     * 有效类型(0领取后生效,1固定时间有效)
     */
    @Column(name = "valid_type")
    private Boolean validType;

    /**
     * 有效天数
     */
    @Column(name = "valid_day")
    private Integer validDay;

    /**
     * 有效起始时间
     */
    @Column(name = "valid_start_time")
    private Date validStartTime;

    /**
     * 有效结束时间
     */
    @Column(name = "valid_end_time")
    private Date validEndTime;

    /**
     * 发放总数
     */
    @Column(name = "total_num")
    private Integer totalNum;

    /**
     * 领取数量
     */
    @Column(name = "take_num")
    private Integer takeNum;

    /**
     * 使用数量
     */
    @Column(name = "use_num")
    private Integer useNum;

    /**
     * 限领数量(人/张)
     */
    @Column(name = "restrict_num")
    private Integer restrictNum;

    /**
     * 优惠平台id
     */
    @Column(name = "discount_platform_id")
    private Long discountPlatformId;

    /**
     * 优惠券来源
     */
    @Column(name = "coupon_source")
    private Integer couponSource;

    /**
     * 是否可退(0不可退,1可退)
     */
    @Column(name = "return_back_yes")
    private Boolean returnBackYes;

    /**
     * 优惠券类型
     */
    @Column(name = "coupon_type")
    private Integer couponType;

    /**
     * 状态(1待审核,2审核未通过,3审核已通过(生效),4失效)
     */
    private Integer status;

    /**
     * 是否可叠加使用
     */
    @Column(name = "append_yes")
    private Boolean appendYes;

    /**
     * 描述
     */
    private String description;
}